<?php
$inp="http://chatbot.in/googleimageproject/snaps/20111018105507.jpg";

echo $inp;

echo '<br>';

echo dirname($_SERVER['REQUEST_URI']);

echo '<br>';
echo strpos($inp,dirname($_SERVER['REQUEST_URI']));

echo '<br>';
echo substr($inp,strpos($inp,dirname($_SERVER['REQUEST_URI']))+strlen(dirname($_SERVER['REQUEST_URI'])));



?>